package com.daily.DailyStudy.kafka;

import com.daily.DailyStudy.kafka.provider.ProductTest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.annotation.PostConstruct;

@SpringBootApplication
public class MainKafka {

    @Autowired
    private ProductTest productTest;

    @PostConstruct
    public void init(){
        for(int i = 0 ; i < 10 ;i ++){
            productTest.send("sjy:"+i);
        }
    }

    public static void main(String[] args) {
        SpringApplication.run(MainKafka.class,args);
    }
}
